package com.cntcdt.api.db.model.base;

import java.io.Serializable;
import java.sql.ResultSet;
import java.util.Date;

/**
 * 这是add_line_user_device的数据传输对象基类,直接与表对应<br>
 */
public abstract class AddLineUserDeviceModelBase implements Serializable {

	private static final long serialVersionUID = 1L;

	/**
	 * 属性:id<br>
	 */
	private Integer id = 0;
	/**
	 * 属性:addLineUserId<br>
	 */
	private Integer addLineUserId = 0;
	/**
	 * 属性:terminal<br>
	 */
	private String terminal = "";
	/**
	 * 属性:addTime<br>
	 */
	private Date addTime = new Date();
	/**
	 * 属性:updateTime<br>
	 */
	private Date updateTime = new Date();

	private Integer opStatus = 0;

	/**
	 * 属性：type 0：代表运维人员 1：代表运维组
	 */
	private Integer type = 0;

	/**
	 * 属性：adminUserGroupId 对应分组id
	 */
	private Integer adminUserGroupId = 0;

	/**
	 * 默认构造方法,构造一个默认的AddLineUserDeviceModelBase对象
	 */
	public AddLineUserDeviceModelBase() {
	}

	/**
	 * 构造函数
	 * 
	 * @param rs
	 *            数据库查询结果集
	 */
	public AddLineUserDeviceModelBase(ResultSet rs) {
		try {
			this.id = rs.getInt("id");
			this.addLineUserId = rs.getInt("addLineUserId");
			this.terminal = rs.getString("terminal");
			this.addTime = rs.getDate("addTime");
			this.updateTime = rs.getDate("updateTime");
			this.opStatus = rs.getInt("opStatus");
			this.type = rs.getInt("type");
			this.adminUserGroupId = rs.getInt("adminUserGroupId");
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public Integer getAdminUserGroupId() {
		return adminUserGroupId;
	}

	public void setAdminUserGroupId(Integer adminUserGroupId) {
		this.adminUserGroupId = adminUserGroupId;
	}

	public Integer getOpStatus() {
		return opStatus;
	}

	public void setOpStatus(Integer opStatus) {
		this.opStatus = opStatus;
	}

	/**
	 * 设置属性id<br>
	 * 
	 * @param id
	 *            待设置的属性id的值
	 */
	public void setId(Integer id) {
		this.id = id;
	}

	/**
	 * 获取属性id<br>
	 * 
	 * @return 属性id的值
	 */
	public Integer getId() {
		return id;
	}

	/**
	 * 设置属性addLineUserId<br>
	 * 
	 * @param addLineUserId
	 *            待设置的属性addLineUserId的值
	 */
	public void setAddLineUserId(Integer addLineUserId) {
		this.addLineUserId = addLineUserId;
	}

	/**
	 * 获取属性addLineUserId<br>
	 * 
	 * @return 属性addLineUserId的值
	 */
	public Integer getAddLineUserId() {
		return addLineUserId;
	}

	/**
	 * 设置属性terminal<br>
	 * 
	 * @param terminal
	 *            待设置的属性terminal的值
	 */
	public void setTerminal(String terminal) {
		this.terminal = terminal;
	}

	/**
	 * 获取属性terminal<br>
	 * 
	 * @return 属性terminal的值
	 */
	public String getTerminal() {
		return terminal;
	}

	/**
	 * 设置属性addTime<br>
	 * 
	 * @param addTime
	 *            待设置的属性addTime的值
	 */
	public void setAddTime(Date addTime) {
		this.addTime = addTime;
	}

	/**
	 * 获取属性addTime<br>
	 * 
	 * @return 属性addTime的值
	 */
	public Date getAddTime() {
		return addTime;
	}

	/**
	 * 设置属性updateTime<br>
	 * 
	 * @param updateTime
	 *            待设置的属性updateTime的值
	 */
	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	/**
	 * 获取属性updateTime<br>
	 * 
	 * @return 属性updateTime的值
	 */
	public Date getUpdateTime() {
		return updateTime;
	}

	/**
	 * 比较两个对象在逻辑上是否相等
	 * 
	 * @see java.lang.Object#equals(java.lang.Object)
	 */
	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof AddLineUserDeviceModelBase)) {
			return false;
		}

		final AddLineUserDeviceModelBase otherModel = (AddLineUserDeviceModelBase) other;
		if (getId() != null && !getId().equals(otherModel.getId())) {
			return false;
		}
		return true;
	}

	/**
	 * 根据主键生成HashCode
	 * 
	 * @see java.lang.Object#hashCode()
	 */
	public int hashCode() {
		StringBuffer buffer = new StringBuffer();
		buffer.append('|').append(id);
		return buffer.toString().hashCode();
	}
}
